#include<stdio.h>
int main()
{
    #define ROWS 4
    #define COLUMNS 4
    int mtr[4][4];
    int i,j,q;
    printf("\n please enter 16 numbers to form a 4*4 matrix:");
    for(i=0;i<16;i++)
    {
        scanf("%d",&mtr[i/4][i%4]);
    }
    printf("\n the matrix is:");
    for(j=0;j<ROWS;j++)
    {
        printf("\n");
        for(q=0;q<COLUMNS;q++)
        printf("%d",mtr[j][q]);
    }

    printf("\n the transpose matrix is:");
    for(j=0;j<ROWS;j++)
    {
        printf("\n");
        for(q=0;q<COLUMNS;q++)
        printf("%d",mtr[q][j]);
    }
    return 0;
}